package 富婆梦.第一阶段.第七周IO流;

import java.io.*;

/**
 * @ProjectName: java-learning
 * @Package: 富婆梦.第一阶段.第七周
 * @ClassName: Echo
 * @Author: hemengjin
 * @Description: 标准IOPrintWriter
 * @Date:2021/9/12 15:02
 * @Version: 1.0
 */
public class Echo {
    public static void main(String[] args) {
        PrintWriter out = new PrintWriter(System.out,true);
        out.print("Hello World");
        try {
            InputStreamReader in = new InputStreamReader(System.in);
            BufferedReader stdin = new BufferedReader(in);
            String s;
/*            while ((s=stdin.readLine())!=null&&s.length()!=0){
                System.out.println(s.toUpperCase());
                //write(s.toUpperCase());
                PrintWriter out = new PrintWriter(System.out,true);
                out.print(s.toUpperCase());
            }*/
        }catch (Exception e){
            e.printStackTrace();
        }
    }
    static void write(String s){
        File file = new File("D:/何梦锦的宝藏/Java学习/Echo.txt");
        try {
            PrintWriter printWriter = new PrintWriter(file.getAbsoluteFile());
            try {
                printWriter.print(s+"\n");
            }finally {
                printWriter.close();
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
